Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods


ODWindowState

Superclasses
ODObject
Subclasses
none

An object of the ODWindowState class maintains a list of all the open window objects for all open drafts in an OpenDoc session and references to the base menu bar and the current menu bar.

Description

When a document is opened, the session object creates a single window-state object. All parts of that document share the window-state object; you can obtain a reference to it by calling the session object's GetWindowState method (page 612). The document shell and dispatcher use the window-state object to pass events to parts so the parts can activate themselves, handle user input, and adjust their menus as necessary. The document shell may manage more than one open document. Typically, however, there is only one open document in a session, but multiple drafts of the document may be open. A part may be displayed in any number of frames in any window of a document. The dispatcher passes events to the correct part, no matter what window encloses the active frame and how many other frames the part has.

Your part accesses the window-state object to create new windows, to access a particular window, and to access the base menu bar object.

For more information related to window objects, see the ODWindow class description (page 824).

Methods

This section presents summary descriptions of the ODWindowState methods grouped according to purpose, followed by detailed descriptions in alphabetical order. Methods marked [D] are called only by the document shell or container applications. Methods marked [M] are specific to the Mac OS platform.

Window Creation

RegisterWindow
Creates an OpenDoc window object and root frame for the specified platform-specific window.
RegisterWindowForFrame
Creates a window object for the specified platform-specific window and root frame.
Window Manipulation

ActivateFrontWindows [M]
Activates the frontmost root window and all the floating windows.
DeactivateFrontWindows [M]
Deactivates the frontmost nonfloating window and all the floating windows.
CloseWindows [D]
Closes all windows belonging to the specified draft.
OpenWindows [D]
Opens all windows belonging to the specified draft.
AcquireWindow
Returns a reference to the window object with the specified ID.
AcquireODWindow
Returns a reference to the window object corresponding to the specified window structure.
AcquireActiveWindow
Returns a reference to the frontmost nonfloating window.
AcquireFrontWindow [M]
Returns a reference to the frontmost window.
AcquireFrontFloatingWindow [M]
Returns a reference to the frontmost floating window.
AcquireFrontRootWindow [M]
Returns a reference to the frontmost (nonfloating) root window.
Externalize [D]
Writes to persistent storage the window properties of windows of the specified draft and saves their frames as the root frames of the draft.
Internalize [D]
Reads into memory all root frames of the specified draft, causing their parts to open the windows.
CreateWindowIterator
Creates a window iterator object for the windows (of all drafts) in this window-state object.
SetDefaultWindowTitles [D]
Synchronizes window titles with the filename of the document of the specified draft.
Window Characteristics

IsODWindow
Returns a Boolean value that indicates whether this window-state object has a window with the specified platform-specific window.
GetWindowCount
Returns the number of windows (of all open drafts) in this window-state object.
GetRootWindowCount
Returns the number of root windows belonging to the specified draft.
GetTotalRootWindowCount
Returns the total number of root windows of all open drafts.
Menu Bar Manipulation

CreateMenuBar [D]
Creates and initializes a menu bar object.
AcquireCurrentMenuBar [D] [M]
Returns a reference to the current menu bar object.
AcquireBaseMenuBar [D] [M]
Returns a reference to the base menu bar object.
CopyBaseMenuBar
Copies the base menu bar object.
SetBaseMenuBar [D]
Installs the specified menu bar object as the base menu for parts to copy.
AdjustPartMenus
Prepares both the root part and the part with the menu focus to display their menus.
Facet and Canvas Creation

CreateFacet
Creates a facet object.
CreateCanvas
Creates a canvas object.

Methods
AcquireActiveWindow
AcquireBaseMenuBar
AcquireCurrentMenuBar
AcqurieFrontFloatingWindow
AcquireFrontRootWindow
AcquireFrontWindow
AcquireODWindow
AcquireWindow
ActivateFrontWindows
AdjustPartMenus
CloseWindows
CopyBaseMenuBar
CreateCanvas
CreateFacet
CreateMenuBar
CreateWindowIterator
DeactivateFrontWindows
Externalize
GetRootWindowCount
GetTotalRootWindowCount
GetWindowCount
Internalize
IsODWindow
OpenWindows
RegisterWindow
RegisterWindowForFrame
SetBaseMenuBar
SetDefaultWindowTitles

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help